<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"sekla.cn","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"valine","storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="RTSS-2014-Predictable Communication and Migration in the Quest-V Separation KernelQuest-V分离内核中的通信与迁移Quest-V是什么，简介quest-v是一个分离内核，把系统划分成一组沙箱，每个沙箱封装一个或多个CPU，一个机器物理内存区域，和一个I&#x2F;O子集设备。quest-v类似分布式系统，使用显式通信通道在">
<meta property="og:type" content="article">
<meta property="og:title" content="论文阅读RTSS-2014-Quest-V分离内核中的通信与迁移(1)导读与简述">
<meta property="og:url" content="http://sekla.cn/2021/11/10/quest-v-1/index.html">
<meta property="og:site_name" content="Sekla&#39;s Blog">
<meta property="og:description" content="RTSS-2014-Predictable Communication and Migration in the Quest-V Separation KernelQuest-V分离内核中的通信与迁移Quest-V是什么，简介quest-v是一个分离内核，把系统划分成一组沙箱，每个沙箱封装一个或多个CPU，一个机器物理内存区域，和一个I&#x2F;O子集设备。quest-v类似分布式系统，使用显式通信通道在">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/11/10/ALukNyd9wb6irmz.png">
<meta property="article:published_time" content="2021-11-10T04:00:00.000Z">
<meta property="article:modified_time" content="2021-11-10T06:13:29.881Z">
<meta property="article:author" content="Sekla">
<meta property="article:tag" content="C">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/11/10/ALukNyd9wb6irmz.png">

<link rel="canonical" href="http://sekla.cn/2021/11/10/quest-v-1/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>论文阅读RTSS-2014-Quest-V分离内核中的通信与迁移(1)导读与简述 | Sekla's Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

  <script type="text/javascript" src="/js/my_js/clicklove.js"></script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-math@4.0.0/dist/style.css">
<!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Sekla's Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Keep Learning Keep Doing</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">14</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">23</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">100</span></a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://sekla.cn/2021/11/10/quest-v-1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Sekla">
      <meta itemprop="description" content="Sekla">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Sekla's Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          论文阅读RTSS-2014-Quest-V分离内核中的通信与迁移(1)导读与简述
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2021-11-10 12:00:00 / 修改时间：14:13:29" itemprop="dateCreated datePublished" datetime="2021-11-10T12:00:00+08:00">2021-11-10</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" itemprop="url" rel="index"><span itemprop="name">操作系统</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span><br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>2.5k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>2 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="RTSS-2014-Predictable-Communication-and-Migration-in-the-Quest-V-Separation-Kernel"><a href="#RTSS-2014-Predictable-Communication-and-Migration-in-the-Quest-V-Separation-Kernel" class="headerlink" title="RTSS-2014-Predictable Communication and Migration in the Quest-V Separation Kernel"></a>RTSS-2014-Predictable Communication and Migration in the Quest-V Separation Kernel</h1><h2 id="Quest-V分离内核中的通信与迁移"><a href="#Quest-V分离内核中的通信与迁移" class="headerlink" title="Quest-V分离内核中的通信与迁移"></a>Quest-V分离内核中的通信与迁移</h2><h3 id="Quest-V是什么，简介"><a href="#Quest-V是什么，简介" class="headerlink" title="Quest-V是什么，简介"></a>Quest-V是什么，简介</h3><p>quest-v是一个分离内核，把系统划分成一组沙箱，每个沙箱封装一个或多个CPU，一个机器物理内存区域，和一个I/O子集设备。quest-v类似分布式系统，使用显式通信通道在沙箱之间交换数据和迁移地址空间。</p>
<p>Quest-V中的通信和地址空间迁移都是可预测的，是系统安全的，本文描述了如何实现在实现复杂的沙箱多进程任务调度，并在不违反以上相关联服务下如何保证实时通信和迁移。</p>
<a id="more"></a>

<h3 id="Quest-V提出原因与基础"><a href="#Quest-V提出原因与基础" class="headerlink" title="Quest-V提出原因与基础"></a>Quest-V提出原因与基础</h3><p>嵌入式系统中多核处理器越来越普及，全局的调度策略管理所有任务是不理想的，随着分离原则设计与分离内核的概念提出，Quest-V分离内核的开发就是用于实时系统和安全关键的系统。</p>
<p>包括Corey、FOS和Barrelfish在内的一 些系统已经采用了在多核和多核架构上将资源划分 为逻辑上独立的域的思想。这些系统侧重于可扩展性而非实时性。把资源和系统组件分离到逻辑上隔离的域中具有增加系统可预测性的千里。Quest-V可以在硬件可用的情况下利用现代CPU的硬件虚拟化功能，把系统划分成一组沙箱，每个沙箱包含相对应的组件，每个沙箱就像传统分布式系统的计算节点。硬件虚拟化的支持不是必需的，但是可以加强沙箱域的安全隔离。</p>
<p>但是Quest-V与传统的分布式系统不同的是使用共享内存通道进行通信，而其他方面Quest-V就是一个分布式系统，然而是没有全局调度器的。</p>
<h4 id="需求"><a href="#需求" class="headerlink" title="需求"></a>需求</h4><p>QuestV需要支持把线程和地址空间分配迁移到特定沙箱和分配给相应内核，具有实时约束的程序可能需要把多线程程序分配给多个沙箱，否则单个沙箱可能会过载。还需要完成沙箱间的通信和迁移。</p>
<h3 id="Quest-V体系结构"><a href="#Quest-V体系结构" class="headerlink" title="Quest-V体系结构"></a>Quest-V体系结构</h3><p><img src="https://i.loli.net/2021/11/10/ALukNyd9wb6irmz.png" alt="image-20211110085210650"></p>
<h4 id="基本架构"><a href="#基本架构" class="headerlink" title="基本架构"></a>基本架构</h4><p>Quest-V作为安全关键系统来设计，如上图分为很多的沙箱，不同安全关键级别的任务和内核服务映射到沙箱中。</p>
<p>沙箱物理环境：每个沙箱封装一个或者多个处理器核心(PCPU(s))，IO设备，以及机器物理的内存区域。</p>
<p>沙箱软件环境：监控层(Monitor)，客户操作系统(OS)，和一组应用程序任务。</p>
<p>Quest-V使用机器虚拟化技术在单独沙箱中划分硬件资源，Quest-V硬件虚拟化只会在启动时在沙箱间划分机器资源，没有其他用途。</p>
<h4 id="监视器"><a href="#监视器" class="headerlink" title="监视器"></a>监视器</h4><p>沙箱间通信使用显式地通道与迁移。沙箱一旦启动，每个沙箱监视器只需要和其他沙箱建立通信通道，并协助恢复故障，在不重启整个系统的情况下检测故障并恢复沙箱的状态，只需要监视器保持工作。</p>
<p>监视器Monitor是受信任的管理扩展页表的软件与建立通信与故障检测与恢复的软件，占用的内存很少(一般少于几千字节)。其管理扩展页表类似常规操作系统中的页表映射。</p>
<p>监视器不属于沙箱正常执行的一部分：</p>
<p>每个用户操作系统负责管理沙箱中的硬件资源，在没有监视器干预下执行调度，IO和内存管理，由于Quest-V并没有多用户虚拟机，所以在一组硬件上是被静态划分成单独的域，Quest-V中的用户操作系统功能完全。</p>
<h4 id="虚拟CPU调度"><a href="#虚拟CPU调度" class="headerlink" title="虚拟CPU调度"></a>虚拟CPU调度</h4><h5 id="VCPU是什么"><a href="#VCPU是什么" class="headerlink" title="VCPU是什么"></a>VCPU是什么</h5><p>Quest-V提出一个VCPU的调度框架。软件进程或线程映射到VCPU，VCPU再来映射到相对应沙箱中的PCPU中，VCPU是虚拟化的逻辑抽象。</p>
<h5 id="VCPU做什么"><a href="#VCPU做什么" class="headerlink" title="VCPU做什么"></a>VCPU做什么</h5><p>VCPU是用于识别在特定实时时间窗口中在PCPU上被允许执行的时间片。默认情况下，与常规任务关联的所有VCPU的行为类似于零星服务器，并被分配静态优先级。</p>
<p><strong>零星系统(Sporadic servers):</strong></p>
<p>sporadic servers由其时间片、执行时间和优先级指定。 在系统操作期间，sporadic servers将保留其执行时间直到它服务的某一任务之一准备执行，此时，Sporadic server将使用其可用的执行时间来服务该任务。  </p>
<p>每个VCPU $V_i$都有一个预算容量$C_i$，补给周期$T_i$，然后单调速率调度用于确定调度性。       </p>
<h5 id="Sporadic-servers目的"><a href="#Sporadic-servers目的" class="headerlink" title="Sporadic servers目的"></a>Sporadic servers目的</h5><p>将VCPU基于sporadic servers进行管理的想法是基于一种观察，这种观察即发出IO请求的任务通常会在不能保证定期的时间阻塞和唤醒。Sporadic servers模型使具有最小到达时间间隔的事件能够被分析，就好像他们是周期性的。</p>
<p><strong>单调速率算法(RMS)：</strong></p>
<p>采用抢占的、静态优先级的策略，调度周期性任务。RMS的基本思路是任务的优先级与它的周期表现为单调函数的关系。</p>
<p>当较低优先级的进程正在运行并且较高优先级的进程可以运行时，较高优先级进程将会抢占低优先级。在进入系统时，每个周期性任务会分配一个优先级，它与其周期成反比，即周期越短，优先级越高；周期越长，优先级越低。这种策略背后的理由是：更频繁地需要 CPU 的任务应分配更高的优先级。此外，单调速率调度假定：对于每次CPU 执行，周期性进程的处理时间是相同的。也就是说，在每次进程获取 CPU 时，它的 CPU 执行长度是相同的。</p>
<p>为了提高利用率，可以将Quest-V配置为根据动态的，基于截止日期的优先级来调度VCPU，在论文中是假设所有VCPU都根据静态优先级进行调度。</p>
<h4 id="沙箱间通信"><a href="#沙箱间通信" class="headerlink" title="沙箱间通信"></a>沙箱间通信</h4><p>沙箱间通信依赖于构建在共享内存上的信息传递原语，使用处理器间中断(IPI)的异步事件通知机制。</p>
<p><strong>IPI：</strong>IPI目前用于与远程沙箱通信以协助故障恢复，还可以用于通知通过共享内存通道交换的信息的到达，Monitor根据需要更新扩展页表映射，在特定沙箱之间建立消息传递通道。只有那些具有映射共享页面的沙箱才能相互通信。所有其他沙箱都与这些内存区域隔离。</p>
<h4 id="建立数据结构-mailbox："><a href="#建立数据结构-mailbox：" class="headerlink" title="建立数据结构 mailbox："></a>建立数据结构 mailbox：</h4><p>一个<strong>mailbox</strong>数据结构由共享内存中每端的信道建立起来。Quest-V当前通过轮询每个相关邮箱中的状态位来确定消息的正确接收，从而支持异步通信。</p>
<h4 id="消息传递线程"><a href="#消息传递线程" class="headerlink" title="消息传递线程"></a>消息传递线程</h4><p>消息传递线程是绑定到具有特定参数的VCPU上，控制信息交换的速率，发送和接收线程会被分配给更高优先级的VCPU，以减少通过通信信道的传输延迟，可以根据需要对共享内存通道进行优先排序并授予更高或更低的吞吐量，同时确保以可预测的方式传递信息。</p>

    </div>
    
    
    

      <footer class="post-footer">
          
          <div class="post-tags">
              <a href="/tags/C/" rel="tag"><i class="fa fa-tag"></i> C</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/11/09/leetcode3/" rel="prev" title="LeetCode3.无重复字符的最长子串">
      <i class="fa fa-chevron-left"></i> LeetCode3.无重复字符的最长子串
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/11/11/os-schoollab-3/" rel="next" title="模拟系统时钟中断与处理">
      模拟系统时钟中断与处理 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#RTSS-2014-Predictable-Communication-and-Migration-in-the-Quest-V-Separation-Kernel"><span class="nav-number">1.</span> <span class="nav-text">RTSS-2014-Predictable Communication and Migration in the Quest-V Separation Kernel</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Quest-V%E5%88%86%E7%A6%BB%E5%86%85%E6%A0%B8%E4%B8%AD%E7%9A%84%E9%80%9A%E4%BF%A1%E4%B8%8E%E8%BF%81%E7%A7%BB"><span class="nav-number">1.1.</span> <span class="nav-text">Quest-V分离内核中的通信与迁移</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Quest-V%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%8C%E7%AE%80%E4%BB%8B"><span class="nav-number">1.1.1.</span> <span class="nav-text">Quest-V是什么，简介</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Quest-V%E6%8F%90%E5%87%BA%E5%8E%9F%E5%9B%A0%E4%B8%8E%E5%9F%BA%E7%A1%80"><span class="nav-number">1.1.2.</span> <span class="nav-text">Quest-V提出原因与基础</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E9%9C%80%E6%B1%82"><span class="nav-number">1.1.2.1.</span> <span class="nav-text">需求</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Quest-V%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84"><span class="nav-number">1.1.3.</span> <span class="nav-text">Quest-V体系结构</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%9F%BA%E6%9C%AC%E6%9E%B6%E6%9E%84"><span class="nav-number">1.1.3.1.</span> <span class="nav-text">基本架构</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E7%9B%91%E8%A7%86%E5%99%A8"><span class="nav-number">1.1.3.2.</span> <span class="nav-text">监视器</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%99%9A%E6%8B%9FCPU%E8%B0%83%E5%BA%A6"><span class="nav-number">1.1.3.3.</span> <span class="nav-text">虚拟CPU调度</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#VCPU%E6%98%AF%E4%BB%80%E4%B9%88"><span class="nav-number">1.1.3.3.1.</span> <span class="nav-text">VCPU是什么</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#VCPU%E5%81%9A%E4%BB%80%E4%B9%88"><span class="nav-number">1.1.3.3.2.</span> <span class="nav-text">VCPU做什么</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#Sporadic-servers%E7%9B%AE%E7%9A%84"><span class="nav-number">1.1.3.3.3.</span> <span class="nav-text">Sporadic servers目的</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%B2%99%E7%AE%B1%E9%97%B4%E9%80%9A%E4%BF%A1"><span class="nav-number">1.1.3.4.</span> <span class="nav-text">沙箱间通信</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%BB%BA%E7%AB%8B%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84-mailbox%EF%BC%9A"><span class="nav-number">1.1.3.5.</span> <span class="nav-text">建立数据结构 mailbox：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%B6%88%E6%81%AF%E4%BC%A0%E9%80%92%E7%BA%BF%E7%A8%8B"><span class="nav-number">1.1.3.6.</span> <span class="nav-text">消息传递线程</span></a></li></ol></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Sekla"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Sekla</p>
  <div class="site-description" itemprop="description">Sekla</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">100</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">23</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">14</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/ShenTiao" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;ShenTiao" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:584892986@qq.com" title="E-Mail → mailto:584892986@qq.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

      <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1416875904&auto=0&height=66"></iframe>
      
    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Sekla</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">288k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">4:22</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script size="300" alpha="0.6" zIndex="-1" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/shizuku.model.json"},"display":{"position":"left","width":250,"height":500},"mobile":{"show":false},"react":{"opacity":0.9},"log":false});</script></body>
</html>

<script type="text/javascript" src="/js/src/love.js"></script>
